<?php

namespace App\Library\Requests\Upload;

class UploadImageRequest extends UploadFileRequest
{
    public function rules(): array
    {
        return array_merge(parent::rules(), [
            'file' => 'required|file|between:0,20480|mimes:jpg,jpeg,png,gif',
        ]);
    }

    public function messages(): array
    {
        return [
            'file.required' => '请选择要上传的图片',
        ];
    }
}
